<html>
<head> 
  <meta charset="UTF-8"> 
  <title>汉字转拼音_pinyin.js</title>
</head>
<body>
<script src="./pinyin.js"></script>

汉字转拼音 <br/>
<input type="text" name="word" id="word" value="你好" />
<button onclick="alert(pinyin.convert(document.getElementById('word').value));">转换</button>


<br/><br/><br/><br/>
<a href="https://github.com/xnx3/pinyin.js">开源仓库：  https://github.com/xnx3/pinyin.js</a>
</body>
</html>